//
//  TableViewDataSource.m
//  TestAfn2
//
//  Created by xujingjing on 16/6/17.
//  Copyright © 2016年 xujingjing. All rights reserved.
//

#import "TableViewDataSource.h"
#import "PingJIACELL.h"

@implementation TableViewDataSource


#pragma markTableVIewDelegate
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    
    static NSString *cellId = @"cell";
    PingJIACELL *cell = [tableView dequeueReusableCellWithIdentifier:cellId];
    if (!cell) {
        cell = [[PingJIACELL alloc]initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:cellId];
        
    }
    
    cell.healthModel = [MJhealthModel mj_objectWithKeyValues:_mjnewsArray[indexPath.row]];
    
    return cell;
}

-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    
    
    return _mjnewsArray.count;
}


@end
